<template>
  <div class="detail">
    <div class="nav">
      <img :src="backImg" alt="" @click="backClick">
    </div>
    <div class="main">
      id为{{id}}的新闻详情...
    </div>
  </div>
</template>

<script>
import backImg from '@/assets/img/back.png'
export default{
  props:['id'],
  name:'App',
  data(){
    return {
      backImg
    }
  },
  methods:{
    // 返回之前路由
    backClick(){
      this.$router.go(-1);
    }
  }
}
</script>

<style lang="less" scoped>
.detail{
  height: 100%;
  .nav{
    height: 45px;
    img{
      margin-top: 6px;
      vertical-align: middle;
    }
  }
  .main{
    text-align: center;
  }
}
</style>
